{% extends "templates/base.phtml" %}
{%block content%}
{% if wxc is defined %}
<div class="page-content-wrap" xmlns="http://www.w3.org/1999/html">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default tabs">
                {%include 'include/wx_tabs' with ['action':action]%}
                <div class="panel-body tab-content">
                    <div class="tab-pane active">
                        <div class="col-md-12">
                            <h3>首次关注回复</h3>

                            <form class="form-horizontal" method="post">
                                <div class="panel panel-default">
                                    <div class="panel-body def-pan-bd">
                                        <div class="col-title col-md-12 col-xs-12 form-horizontal">
                                            <div class="form-group">
                                                <label class="col-md-2 col-xs-4 control-label">请选择智能回复类型：</label>

                                                <div class="col-md-4 col-xs-4">
                                                    <select class="form-control select">
                                                        <option>首次关注回复</option>
                                                        <option>文本回复</option>
                                                        <option>图文回复</option>
                                                        <option>多图文回复</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="panel-body tab-content form-horizontal">
                                            <div class="form-group">
                                                <div class="col-md-12">
                                                    <h4>关注时自动回复内容:</h4>
                                                    <textarea name="content" class="form-control" rows="5">{% if reply.content is defined %}{{reply.content}}{%endif%}</textarea>
                                                </div>
                                            </div>
                                            <div class="checkbox col-md-12">
                                                <label>
                                                    <input name="check" type="checkbox" {% if reply.check is defined %}checked{%endif%}>
                                                    若是想关注回复多图，此项必须沟选
                                                </label>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-md-1 control-label">输入关键词:</label>

                                                <div class="col-md-3">
                                                    <input name="keyword" type="text" class="form-control" value="{% if reply.keyword is defined %}{{reply.keyword}}{%endif%}">
                                                </div>

                                            </div>
                                            <p class="col-md-12">例：填写"功能",系统会检索包含最近发布的9条信息，若想关注回复回复首页,此项请填写 首页</p>

                                            <div class="form-group col-md-12">
                                                <div class="col-md-6 col-xs-12 col-md-offset-4">
                                                    <button class="btn btn-primary">保存</button>
                                                    <a class="btn btn-danger">取消</a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{%endif%}
{%endblock%}{%block end%}
<style type="text/css">
    .def-pan-bd {
        padding: 0 !important;
    }

    .col-title {
        background: #F5F5F5;
        padding: 10px 0;
    }

    .col-title .right {
        text-align: center;
    }

    .col-bd {
        padding: 0 !important;
    }

    table * {
        text-align: center;
    }
</style>
<script type="text/javascript">
    $(document).ready(function () {
        $('.select').change(function () {
            var go_href = $(this).val();
            switch (go_href) {
                case "首次关注回复":
                    window.location = "/admin/appwx/reply";
                    break;
                case "文本回复":
                    window.location = "/admin/appwx/text";
                    break;
                case "图文回复":
                    window.location = "/admin/appwx/img";
                    break;
                case "多图文回复":
                    window.location = "/admin/appwx/multi";
                    break;
            }
        });
    });
</script>
{%endblock%}